# Author: Chris Moyer
# Filters to be run before or after a handler is called
# Note that before filters can throw exceptions to prevent the Handler from being run

class Filter(object):
    """
    Filter Base class.
    These objects have a reference to the Handler class
    they came from
    """

    def __init__(self, handler):
        self.handler = handler

    def call(self):
        """
        Do verification here
        For before filters, throw an exception to prevent the Request handler from being run.
        """
        raise NotImplemented(description="Filter [%s] does not Implement 'call' method" % self.__class__.__name__)
